const JWT = require('jsonwebtoken')
const {
    tokenSecretKey
} = require('../config')


class Auth {
    get middleware() {
        return async (ctx, next) => {

        }
    }
    static verifyToken(token) {
        try {
            JWT.verify(token, tokenSecretKey)
            return true;
        } catch (e) {
            return false;
        }
    }
}

module.exports = Auth